//k1 编辑

if (isNil "Escape_enemySW_side") then [{
	removeHeadgear player:
	removeGoggles player;
	removeVest player;
	removeBackpack player;
	removeAllWeapons player:
	removeAllAssignedItems player;

	player addItem "ItemRadio";
	player assignItem "ItemRadio";
	player addItem "ItemWatch";
	player assignItem "ItemWatch";

	waitUntil {!isNil "A3E_ParamsParsed"};
	if (Escape_RespawnWep == 1 && {!isNil "Escape_isRespawn"}) then {
		player addMagazine "16Rnd_9x21_Mag";
		player addMagazine "16Rnd_9x21_Mag";
		player addWeapon "hgun_P07_F";
		if (!isNil "A3E_Task_Map_Complete" && {A3E_Task_Map_Complete}) then {player addWeapon "ItemMap"};
	};

	if (Escape_RS_NVG == 1) then {player linkItem "NVGoggles"};
	
	if (!isNil "Escape_isRespawn") then {
		_killNum = player getVariable ["Escape_Kill_num", 0];
		if (_killNum == 0) exitWith {};
		_num = _killNum - Escape_ReviveKill_num;
		if (_num < 0) then {_num = 0};
		player setVariable ["Escape_Kill_num", _num, true];
		[format["<t color='#ff0000' size = '.8'>重生-%1个杀敌人数</t>", Escape_ReviveKill_num],-1,.05 * safezoneH + safezoneY,8,0,0,33] spawn BIS_fnc_dynamicText;
		systemchat format["重生-%1个杀敌人数", Escape_ReviveKill_num];
		call Escape_killNum_show;
	};
},{
	call Escape_fn_enemySW2;
}];

if (isNil "Escape_Map_check") then {
	Escape_Map_check = 1;
	waitUntil {!isNil "A3E_Task_Map_Complete"};
	if (!A3E_Task_Map_Complete) then {
		0 spawn {
			waitUntil {sleep .1; !isNil "A3E_EscapeHasStarted"};
			waitUntil {sleep .3; "ItemMap" in (assignedItems player) || {"ItemGPS" in (assignedItems player)} || {{["uavterminal", _x] call BIS_fnc_inString} count (assignedItems player) > 0} || {A3E_Task_Map_Complete}};
			if (A3E_Task_Map_Complete) exitWith {};
			A3E_Task_Map_Complete = true;
			publicVariable "A3E_Task_Map_Complete";
		};
	};
};

Escape_isRespawn = 1;

 